package com.designpattern.StatePattern;

/**
 * @Author yp
 * @Date 2021-06-21
 * @Description 状态模式测试类
 **/
public class Test {
    public static void main(String[] args) {
        ThreadContext context = new ThreadContext();
        context.start();
        context.getCPU();
        context.suspend();
        context.resume();
        context.getCPU();
        context.stop();
    }

}
